<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>demo</title>
</head>

<body>
  <button>点我试试</button>

  <script src="//ossweb-img.qq.com/images/js/jquery/jquery-1.9.1.min.js"></script>
  <script>
    $('button').on('click',function () {
      // http://127.0.0.1:8888/api/rank
      $.ajax({
        type: 'get',
        url: 'http://127.0.0.1:8888/api/rank',
        success: function (data) {
          console.log(data)
        }
      })
    })
  </script>
</body>

</html>